//
//  AppDelegate.m
//  HaoHaiSpell
//
//  Created by 郭健 on 16/6/12.
//  Copyright © 2016年 海城. All rights reserved.
//

#import "AppDelegate.h"
#import "GJTabBarController.h"
<<<<<<< HEAD
 #import <EMSDK.h>
#import <AMapFoundationKit/AMapFoundationKit.h>
=======

>>>>>>> 5bee59541ff07dbcbaa6fe419e6df24b39c5e23d


@interface AppDelegate ()

@end

@implementation AppDelegate

<<<<<<< HEAD
- (void)configureAPIKey
{
    const static NSString *APIKey = @"93f32c98830605a7560d315152dc4f97";
//    if ([APIKey length] == 0)
//    {
//        NSString *reason = [NSString stringWithFormat:@"apiKey为空，请检查key是否正确设置。"];
//        
//        UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"提示" message:reason delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil, nil];
//        
//        [alert show];
//    }
    
    [AMapServices sharedServices].apiKey = (NSString *)APIKey;
}
=======
>>>>>>> 5bee59541ff07dbcbaa6fe419e6df24b39c5e23d

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    self.window = [[UIWindow alloc]initWithFrame:[UIScreen mainScreen].bounds];
    
    self.window.rootViewController = [[GJTabBarController alloc] init];
    
    [self.window makeKeyAndVisible];
<<<<<<< HEAD
    
    EMOptions *options = [EMOptions optionsWithAppkey:@"970605308#haohaispell"];
    
    [[EMClient sharedClient] initializeSDKWithOptions:options];
    // 配置高德地图
    [self configureAPIKey];
=======

    
>>>>>>> 5bee59541ff07dbcbaa6fe419e6df24b39c5e23d
    
    return YES;
}

- (void)applicationWillResignActive:(UIApplication *)application {
    
<<<<<<< HEAD
    [[EMClient sharedClient] applicationDidEnterBackground:application];
=======

>>>>>>> 5bee59541ff07dbcbaa6fe419e6df24b39c5e23d
}


- (void)applicationDidEnterBackground:(UIApplication *)application {
<<<<<<< HEAD
   [[EMClient sharedClient] applicationWillEnterForeground:application];
=======
   
>>>>>>> 5bee59541ff07dbcbaa6fe419e6df24b39c5e23d
}

- (void)applicationWillEnterForeground:(UIApplication *)application {
    // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
}

- (void)applicationDidBecomeActive:(UIApplication *)application {
    // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}

- (void)applicationWillTerminate:(UIApplication *)application {
    // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}

@end
